# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=choose
pkgver=1.3.4
pkgrel=3
pkgdesc="A human-friendly and fast alternative to cut and (sometimes) awk"
url="https://github.com/theryangeary/choose"
arch="x86_64 armv7 armhf aarch64 x86 ppc64le"  # limited by rust/cargo
license="GPL-3.0-or-later"
makedepends="cargo cargo-auditable"
source="https://github.com/theryangeary/choose/archive/v$pkgver/choose-$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/choose -t "$pkgdir"/usr/bin/
}

sha512sums="
cae908f907ede9b5020ee02e666d297a8bfb6735b18505be21c7e00719b3ee8dd72eff7fc4a40247abf5113f32343438392f62bf7c330fdadd4bea63cc7e80ec  choose-1.3.4.tar.gz
"
